package com.wt.springboot.service;

import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

/**
 * Created with IDEA
 * Describe:
 * Author:TianJi
 * Date:2018/11/20
 * Time:19:15
 */
@Service
public class AsyncService {
    //告诉spring这是一个异步方法
    @Async
    public void hello() {
        try {
            Thread.sleep(3000);
        } catch (Exception e) {
            e.printStackTrace();
        }
        System.out.println("处理数据中.......");
    }
}
